package top.ahwyy.utils;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

public class dateTime {
	public static Timestamp getDateTime(){

		Date date = new Date();//获得系统时间.
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String nowTime = sdf.format(date);
		Timestamp datetime =Timestamp.valueOf(nowTime);//把时间转换
		
		return datetime;
	}
}
